﻿using System;
using Microsoft.Xna.Framework;

namespace Terraria.ModLoader
{
	// Token: 0x020001C7 RID: 455
	internal class ChatCommandCaller : CommandCaller
	{
		// Token: 0x1700015D RID: 349
		// (get) Token: 0x060012FC RID: 4860 RVA: 0x00008CF7 File Offset: 0x00006EF7
		public CommandType CommandType
		{
			get
			{
				return CommandType.Chat;
			}
		}

		// Token: 0x1700015E RID: 350
		// (get) Token: 0x060012FD RID: 4861 RVA: 0x00007277 File Offset: 0x00005477
		public Player Player
		{
			get
			{
				return Main.player[Main.myPlayer];
			}
		}

		// Token: 0x060012FE RID: 4862 RVA: 0x0040EFC0 File Offset: 0x0040D1C0
		public void Reply(string text, Color color = default(Color))
		{
			if (color == default(Color))
			{
				color = Color.White;
			}
			foreach (string newText in text.Split(new char[]
			{
				'\n'
			}))
			{
				Main.NewText(newText, color.R, color.G, color.B, false);
			}
		}
	}
}
